home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-in_the_mag-
/
reader_requests
/
scilab
/
man
/
man-part1
/
cat1
/
if.1
< prev
next >
Wrap
Text File
|
1999-09-16
|
775b
|
67 lines
if(1) Scilab Function if(1)
NAME
if then else - conditional execution
DESCRIPTION
Conditional execution; the syntax is the following :
if boolean then instructions,
elseif expri then instructions,
....
[else instructions],
end
- The only constraint is that each then keyword must be on the same line
line as its corresponding if or elseif keyword.
- The keyword then can be replaced by a carriage return or a comma.
EXAMPLE
i=2
for j = 1:3,
if i == j then
a(i,j) = 2;
elseif abs(i-j) == 1 then
a(i,j) = -1;
else a(i,j) = 0;
end,
end
SEE ALSO
while, select, boolean, end, then, else